package com.jctrip.hotel.source.client;

import com.jctrip.hotel.source.model.hmein.req.*;
import com.jctrip.hotel.source.model.hmein.resp.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author henry
 * @Date 2023/5/24 21:20
 * @Description
 */
@FeignClient(name = "HmeinClient", url = "${feign.url.hmein}")
@RequestMapping(headers = {"accept=application/json", "Content-Type=application/json;charset=UTF-8"})
public interface HmeinClient {
    /**
     * 获取城市信息
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/CityListData")
    CityListResult getCityListData(@RequestBody BaseReq req);

    /**
     * 获取酒店id 和房型列表
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/GETChannelRmType")
    ChannelRmtypeResult getHotelIdList(@RequestBody HotelIdListReq req);

    /**
     * 获取酒店基础信息
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/GetHotelInfo")
    HotelInfosResult getHotelInfo(@RequestBody HotelInfoReq req);

    /**
     * 获取酒店房型
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/GetHotelRmMc")
    HotelRmMcResult getRoomType(@RequestBody RoomTypeReq req);

    /**
     * 查询酒店图片信息
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/QueryHotelPicUrl")
    HotelPicResult queryHotelPicUrl(@RequestBody HotelPicReq req);

    /**
     * 获取房态
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelAvailableRM/GetProducts")
    RoomStatusResult getRoomStatus(@RequestBody RoomStatusReq req);

    /**
     * 酒店基础设施
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/HotelFacilitiesListData")
    HotelFacilitiesResult getHotelFacilitiesListData(@RequestBody HotelFacilitiesListDataReq req);

    /**
     * 试单
     */
    @PostMapping("/HomeinnsAgentApi/api/Resv/CheckAvailable")
    CheckAvailableResult checkAvailable(@RequestBody CheckAvailableReq req);

    /**
     * 下单
     */
    @PostMapping("/HomeinnsAgentApi/api/Resv/CreateOrder")
    CreateOrderResult createOrder(@RequestBody CreateOrderReq req);

    /**
     * 查询订单
     */
    @PostMapping("/HomeinnsAgentApi/api/Resv/QueryOrderStatus")
    QueryOrderStatusResult queryOrderStatus(@RequestBody QueryOrderStatusReq req);


    /**
     * 取消订单
     */
    @PostMapping("/HomeinnsAgentApi/api/Resv/CancelOrder")
    CancelOrderResult cancelOrder(@RequestBody CancelOrderReq req);

    /**
     * 查询酒店品牌
     */
    @PostMapping("/HomeinnsAgentApi/api/HotelInfo/BrandListData")
    GetHmeinBrandListResult getBrandList(@RequestBody GetHmeinBrandListReq req);
}
